package com.easa.entity;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;

@Entity
public class Teachermsg {
    private String tid;
    private String tname;
    private String password;
    private String professinalTitle;
    private String contactWay;
    private Integer role;
    private Integer status;
    private String registerTime;
    private String instruction;

    @Id
    @Column(name = "tid")
    public String getTid() {
        return tid;
    }

    public void setTid(String tid) {
        this.tid = tid;
    }

    @Basic
    @Column(name = "tname")
    public String getTname() {
        return tname;
    }

    public void setTname(String tname) {
        this.tname = tname;
    }

    @Basic
    @Column(name = "password")
    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    @Basic
    @Column(name = "professinalTitle")
    public String getProfessinalTitle() {
        return professinalTitle;
    }

    public void setProfessinalTitle(String professinalTitle) {
        this.professinalTitle = professinalTitle;
    }

    @Basic
    @Column(name = "contactWay")
    public String getContactWay() {
        return contactWay;
    }

    public void setContactWay(String contactWay) {
        this.contactWay = contactWay;
    }

    @Basic
    @Column(name = "role")
    public Integer getRole() {
        return role;
    }

    public void setRole(Integer role) {
        this.role = role;
    }

    @Basic
    @Column(name = "status")
    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    @Basic
    @Column(name = "registerTime")
    public String getRegisterTime() {
        return registerTime;
    }

    public void setRegisterTime(String registerTime) {
        this.registerTime = registerTime;
    }

    @Basic
    @Column(name = "instruction")
    public String getInstruction() {
        return instruction;
    }

    public void setInstruction(String instruction) {
        this.instruction = instruction;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Teachermsg that = (Teachermsg) o;

        if (tid != null ? !tid.equals(that.tid) : that.tid != null) return false;
        if (tname != null ? !tname.equals(that.tname) : that.tname != null) return false;
        if (password != null ? !password.equals(that.password) : that.password != null) return false;
        if (professinalTitle != null ? !professinalTitle.equals(that.professinalTitle) : that.professinalTitle != null)
            return false;
        if (contactWay != null ? !contactWay.equals(that.contactWay) : that.contactWay != null) return false;
        if (role != null ? !role.equals(that.role) : that.role != null) return false;
        if (status != null ? !status.equals(that.status) : that.status != null) return false;
        if (registerTime != null ? !registerTime.equals(that.registerTime) : that.registerTime != null) return false;
        if (instruction != null ? !instruction.equals(that.instruction) : that.instruction != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = tid != null ? tid.hashCode() : 0;
        result = 31 * result + (tname != null ? tname.hashCode() : 0);
        result = 31 * result + (password != null ? password.hashCode() : 0);
        result = 31 * result + (professinalTitle != null ? professinalTitle.hashCode() : 0);
        result = 31 * result + (contactWay != null ? contactWay.hashCode() : 0);
        result = 31 * result + (role != null ? role.hashCode() : 0);
        result = 31 * result + (status != null ? status.hashCode() : 0);
        result = 31 * result + (registerTime != null ? registerTime.hashCode() : 0);
        result = 31 * result + (instruction != null ? instruction.hashCode() : 0);
        return result;
    }
}
